package com.moli.iov.base.model.dto;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class DictTypeDto implements Serializable {

    private static final long serialVersionUID = 1L;

    Map<String,String> types ;

    public DictTypeDto(){
        this.types = new HashMap<>();
    }

    public void add(String type){
        if(type!=null && !("").equals(type)){
            types.put(type,null);
        }
    }

    public void add(List<String> tags){
        if(tags!=null && tags.size()>0){
            for (String dictTypeTag:tags) {
                add(dictTypeTag);
            }
        }
    }

    public Set<String> getTypes(){
        return types.keySet();
    }

    public Boolean contains(String type){
        return types.containsKey(type);
    }

}
